package com.hzy.pms.domain.bo;

import com.ruoyi.common.core.validate.AddGroup;
import com.ruoyi.common.core.validate.EditGroup;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.*;

import java.math.BigDecimal;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * sku信息业务对象 pms_sku
 *
 * @author zengxin
 * @date 2023-10-17
 */

@Data
@EqualsAndHashCode(callSuper = true)
public class SkuBo extends BaseEntity {

    /**
     * ID
     */
    @NotNull(message = "ID不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * sku_snapshot_id
     */
    @NotNull(message = "sku_snapshot_id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long skuSnapshotId;

    /**
     * 产品
     */
    @NotNull(message = "产品不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long productId;

    /**
     * sku编码
     */
    @NotBlank(message = "sku编码不能为空", groups = { AddGroup.class, EditGroup.class })
    private String outSkuId;

    /**
     * 价格
     */
    @NotNull(message = "价格不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal price;

    /**
     * 展示图片
     */
    @NotBlank(message = "展示图片不能为空", groups = { AddGroup.class, EditGroup.class })
    private String pic;

    /**
     * 库存
     */
    @NotNull(message = "库存不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer stock;

    /**
     * 商品销售属性，json格式
     */
    @NotBlank(message = "商品销售属性，json格式不能为空", groups = { AddGroup.class, EditGroup.class })
    private String spData;


}
